#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <climits>
#include <iomanip>
#include <cmath>
#include <string>
#include <vector>
#define int long long
#define x first 
#define y second 
using namespace std;
const int N = 1e5 + 10;
int a[N];

void solve()
{
    int x,y;
    cin >> x >> y;
    if(x < 0 || y < 0) 
    {
        cout << "PING" << endl;
        return;
    }
      if(x == y) 
    {
        cout << "NO" << endl;
        return;
    }
    if(abs(x - y) == 1)//必败的上一个状态必然是必胜
    {
        cout << "YES" << endl;
        return ;
    }
 
    cout << "PING" << endl;
}
signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr),cout.tie(nullptr);
 /*    int t = 1; */
    int t;
    cin >> t;
    while(t -- ) solve();
    return 0;
}